package com.ganmiao.server.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ganmiao.entity.BaseColumns;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 用户帐号
 *
 * @TableName sys_user_account
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("用户账号")
@TableName(value = "sys_user_account")
public class SysUserAccount extends BaseColumns implements Serializable {

    /**
     * 用户账号主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("用户账号主键ID")
    private Integer accountId;

    /**
     * 用户信息ID
     */
    @ApiModelProperty("用户信息ID")
    private Integer userId;

    /**
     * 用户账户
     */
    @NotBlank(message = "用户账户不能为空")
    @ApiModelProperty("用户账户")
    private String userAccount;

    /**
     * 用户密码
     */
    @NotBlank(message = "用户密码不能为空")
    @ApiModelProperty("用户密码")
    private String userPassword;

    /**
     * 系统编码 (supplier:供应商 purchase:采购 portal:门户 mall:商城)
     */
    @NotBlank(message = "用户编码不能为空")
    @ApiModelProperty("系统编码 (supplier:供应商 purchase:采购 portal:门户 mall:商城)")
    private String sysCode;

    /**
     * 状态 (1:正常 9:删除/失效)
     */
    @ApiModelProperty("状态 (1:正常 9:删除/失效)")
    private String status;

    /**
     * 菜单列表(0:pc 1:h5)
     */
    @ApiModelProperty("菜单列表(0:pc 1:h5)")
    @TableField(exist = false)
    private String menuList;

}